﻿@model GameSchool.Models.VideoLecture

@{
    ViewBag.Title = "CreateVideo";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Setja inn fyrirlestur</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Fyrirlestur</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.VideoTitle)
        </div>
        
        <div class="editor-field">
            @Html.EditorFor(model => model.VideoTitle)
            @Html.ValidationMessageFor(model => model.VideoTitle)
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.AssignmentId)
        </div>
       
        <div class="editor-field">
      <!--  <input name="AssignmentId" value="1"/>-->
            @Html.EditorFor(model => model.AssignmentId)
            @Html.ValidationMessageFor(model => model.AssignmentId)
        </div>
        

        <div class="editor-label">
            @Html.LabelFor(model => model.VideoUrl)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.VideoUrl)
            @Html.ValidationMessageFor(model => model.VideoUrl)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Active)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Active)
            @Html.ValidationMessageFor(model => model.Active)
        </div>

        <p>
            <input type="submit" value="Skrá" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Til baka í lista", "ShowAllVideos")
</div>
